import Vue from 'vue'
import Vuex from 'vuex'
import state from './state'
import getters from './getters'
import mutations from './mutations'
import actions from './actions'
Vue.use(Vuex)
// 创建仓库实例
const store = new Vuex.Store({
  strict: true,
  // 存储公共状态
  state,
  getters,
  // mutations中的方法是用来修改 数据
  mutations,
  // 发送请求 拿到数据 触发mutation
  actions
})

export default store
